package br.sc.senai.model.query;

import br.sc.senai.model.entity.Marca;
import br.sc.senai.model.exception.GenericException;
import br.sc.senai.model.interfaces.IQuery;
import br.sc.senai.model.resource.SqlQueryUtil;

public class MarcaQuery implements IQuery {

	private Class entityClass = Marca.class;

	@Override
	public String getQuerySelectAll() throws GenericException {
		return SqlQueryUtil.createSelect(entityClass);
	}

	@Override
	public String getQuerySelectById() throws GenericException {
		return SqlQueryUtil.createSelect(entityClass, "id");
	}

	@Override
	public String getQueryInsert() throws GenericException {
		return SqlQueryUtil.createInsert(entityClass);
	}

	@Override
	public String getQueryUpdateById() throws GenericException {
		return SqlQueryUtil.createUpdate(entityClass, "id");
	}

	@Override
	public String getQueryDeleteById() throws GenericException {
		return SqlQueryUtil.createDelete(entityClass, "id");
	}

}
